<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'userLog.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<style type="text/css">
	
	body {
 		margin: 0px 0px;
		padding: 0px 0px;
		width: 100%;
  		height: 100%;
  	}
	#circle{
		background-image: url(/wifi/img/body.jpg);
	  	background-repeat:no-repeat;
	  	background-position:center; 
	  	background-size:100% 100%;
	  	width: 100%;
	  	height: 100%;
	  	min-height: 800px;
	  	min-width: 1000px;
	}
	#home_entire{
			background-position:center; 
			background-color:#F8F8FF;
			margin: 0 auto; 
			width: 90%;
			height: 100%;
		}
		
	#top_div1,#left{
		float: left;
		width: 23%;
	}
		
	#top_div2,#right{
		float: left;
		margin-left:0.5%;
		width: 14%;
	}
	#top_div3,#content{
		float: right;
		width: 61%;
	}
	#top_div1{
		float: left;
		width: 23%;
	}
	/* #top_div2{
		float: left;
		margin-left:0.5%;
		width: 14%;
	} */
	#top_div3{
		float: right;
		width: 61%;
	}
	
	#top{
			width: 100%;
			height:2.5% ;
			padding-top:5px;
			background-color: #262626;
			font-size: 14px;
			font-weight: 800;
			color: #FF8C00;
		}
	.home_iframe{
		width: 100%;
	  	height: 97%;
	}
	a{
		text-decoration: none;
		color: #262626;
	}
	</style>
	<script type="text/javascript" src="./js/jquery-1.8.2.js"></script>
	<script type="text/javascript">
	
		function upfileName(logfileName){
			if(logfileName!=""){
				$("#logfileName").val(logfileName);
			 }
		}
		
		function down(){
 			var logfileName =document.getElementById("logfileName").value;
			if(logfileName!=""){
				window.location.href="${pageContext.request.contextPath}/Log/userlog_downLogfile.action?logfileStr="+logfileName;	
			}
		}
	
		function leftframe(){
			var phone =document.getElementById("sousuo").value;
			if(phone!=""&&phone!="请输入文件夹名或日期"){
				document.getElementById("leftframe").src="${pageContext.request.contextPath}/Log/userlog_selectLogList.action?phone="+phone;
			}
		}
		function rightframe(fileStr){
			document.getElementById("rightframe").src="${pageContext.request.contextPath}/Log/userlog_selectFileList.action?logfileStr="+fileStr;
		}
		function contentframe(fileStr){
		fileStr="/wifiLOG/userlog/"+fileStr;
			document.getElementById("contentframe").src=fileStr;
		}
		
		
	</script>
   </head>
  		
  <body id="circle">
    <div id="home_entire">
    <div id="top">
	     <div id="top_div1"  >
	    	 <span>日志文件夹 &nbsp;<input id="sousuo" type="text" value="请输入文件夹名或日期" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" 
	   					onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999;width:35%;" 
	   					onkeypress="if (event.keyCode == 13)leftframe();"/>
	   			<button onclick="leftframe()">go</button></span>
	   	</div>
    <div id="top_div2" style="padding-top: 0.19%">
     <span style="margin-left: 6%;">账户日志文件</span>
     </div>
       <div id="top_div3" >
     <span>日志内容 &nbsp;&nbsp;<button onclick="down()">  下载当前日志</button></span>
      </div>
    </div>
  			<div id="left" style="border-left: solid 5px #262626;">
  				<iframe class ="home_iframe" name="iframe" id="leftframe" src="${pageContext.request.contextPath}/Log/userlog_selectLogList.action" frameborder=0 ></iframe>
  			</div>
  			<div id="right">
  				<iframe class ="home_iframe" name="iframe"  id="rightframe" src="${pageContext.request.contextPath}/jsp/log/right.jsp" frameborder=0 ></iframe>
  			</div>
  			<div id="content" style="border-right: solid 5px #262626;">
  				<iframe class ="home_iframe" name="iframe" id="contentframe" src="${pageContext.request.contextPath}/jsp/log/content.jsp" frameborder=0 ></iframe>
  			</div>
  			<div style="clear: both;"></div>
  		</div>
  		<input id="logfileName" value="" type="hidden"/>
  </body>
</html>
